package com.chaos.payment.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chaos.framework.model.entity.IdModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 *
 * @author yjp
 * @since 2024-06-18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper =false)
@Accessors(chain = true)
@TableName("t_pay_flow")
@ApiModel(value="TPayFlow实体", description="支付流水表")
public class TPayFlow extends IdModel {


    @ApiModelProperty(value = "订单编号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "订单类型 (1: 充电  2: 占位)")
    @TableField("order_type")
    private Integer orderType;


    @ApiModelProperty(value = "商户id")
    @TableField("merchant_id")
    private Long merchantId;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;


    @ApiModelProperty(value = "三方订单号")
    @TableField("third_order_no")
    private String thirdOrderNo;


    @ApiModelProperty(value = "三方交易单号")
    @TableField("third_flow_no")
    private String thirdFlowNo;


    @ApiModelProperty(value = "支付金额")
    @TableField("total_amount")
    private BigDecimal totalAmount;


    @ApiModelProperty(value = "订单来源( 1: 微信小程序  )")
    @TableField("channel")
    private Integer channel;


    @ApiModelProperty(value = "支付方式( 1:支付宝 2:微信 3:个人余额 4：企业余额 )")
    @TableField("pay_type")
    private Integer payType;


    @ApiModelProperty(value = "支付场景(1:扫码支付 2:app支付 3:H5支付 4:公众号支付 5:小程序支付 )")
    @TableField("pay_trade_type")
    private Integer payTradeType;


    @ApiModelProperty(value = "支付状态（1：未支付  2：已支付）")
    @TableField("status")
    private Integer status;


    @ApiModelProperty(value = "支付时间")
    @TableField("pay_time")
    private LocalDateTime payTime;


}
